import { defineConfig } from 'vitepress'

const BASE = '/blog-utils/'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: 'Blog Utils',
  description: '常用工具方法的集合',
  lang: 'zh-CN',
  head: [['link', { rel: 'icon', type: 'image/png', href: `${BASE}blog-utils.png` }]],
  themeConfig: {
    logo: {
      src: '/blog-utils.png',
    },
    search: {
      provider: 'local',
      options: {
        translations: {
          button: {
            buttonText: '搜索文档',
            buttonAriaLabel: '搜索文档',
          },
          modal: {
            noResultsText: '没有找到相关结果',
            displayDetails: '展示详细列表',
            resetButtonTitle: '清除查询条件',
            footer: {
              selectText: '选择',
              navigateText: '切换',
              closeText: '关闭',
            },
          },
        },
      },
    },

    nav: [
      { text: '快速上手', link: '/guide' },
      { text: '文档', link: '/docs/date', activeMatch: '/docs/' },
      // {
      //   text: 'Blog Utils生态',
      //   items: [
      //     {
      //       text: 'Blogui Mobile',
      //       link: '',
      //     },
      //     {
      //       text: 'Blogui Mobile Vue',
      //       link: '',
      //     },
      //   ],
      // },
    ],

    sidebar: [
      {
        text: '快速上手',
        link: '/guide',
      },
      {
        text: '文档',
        base: '/docs/',
        items: [
          { text: 'Date 日期', link: 'date' },
        ],
      },
    ],

    sidebarMenuLabel: '菜单',
    returnToTopLabel: '返回顶部',
    darkModeSwitchLabel: '外观',

    socialLinks: [
      {
        icon: {
          svg: '<svg t="1733799759299" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1443" width="200" height="200"><path d="M512 1024C229.222 1024 0 794.778 0 512S229.222 0 512 0s512 229.222 512 512-229.222 512-512 512z m259.149-568.883h-290.74a25.293 25.293 0 0 0-25.292 25.293l-0.026 63.206c0 13.952 11.315 25.293 25.267 25.293h177.024c13.978 0 25.293 11.315 25.293 25.267v12.646a75.853 75.853 0 0 1-75.853 75.853h-240.23a25.293 25.293 0 0 1-25.267-25.293V417.203a75.853 75.853 0 0 1 75.827-75.853h353.946a25.293 25.293 0 0 0 25.267-25.292l0.077-63.207a25.293 25.293 0 0 0-25.268-25.293H417.152a189.62 189.62 0 0 0-189.62 189.645V771.15c0 13.977 11.316 25.293 25.294 25.293h372.94a170.65 170.65 0 0 0 170.65-170.65V480.384a25.293 25.293 0 0 0-25.293-25.267z" fill="#C71D23" p-id="1444"></path></svg>',
        },
        link: 'https://gitee.com/xiaomoguiya/blog-utils.git',
      },
    ],
    outline: {
      label: '此页面',
    },

    docFooter: {
      prev: '上一页',
      next: '下一页',
    },

    footer: {
      copyright: '© 2023 浮名半生',
    },
  },
  cleanUrls: true,
  base: BASE,
})
